package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * DvDevolAnula generated by hbm2java
 */
@Entity
@Table(name = "DV_DEVOL_ANULA", schema = "DEVOLUCIONES")
@SequenceGenerator(name = "SEQ_DV_DEVOL_ANULA", sequenceName = "SEQ_DV_DEVOL_ANULA")
public class DvDevolAnula implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3282434990832416306L;
	private Long nanulacion;
	private DvMedioDevol dvMedioDevol;
	private Date fhingreso;
	private String nit;
	private String cusuario;
	private String smotivo;

	public DvDevolAnula() {
	}

	public DvDevolAnula(Long nanulacion, DvMedioDevol dvMedioDevol, Date fhingreso,
			String cusuario, String smotivo) {
		this.nanulacion = nanulacion;
		this.dvMedioDevol = dvMedioDevol;
		this.fhingreso = fhingreso;
		this.cusuario = cusuario;
		this.smotivo = smotivo;
	}

	public DvDevolAnula(Long nanulacion, DvMedioDevol dvMedioDevol, Date fhingreso, String nit,
			String cusuario, String smotivo) {
		this.nanulacion = nanulacion;
		this.dvMedioDevol = dvMedioDevol;
		this.fhingreso = fhingreso;
		this.nit = nit;
		this.cusuario = cusuario;
		this.smotivo = smotivo;
	}

	@Id
	@Column(name = "N_ANULACION", unique = true, nullable = false, precision = 10, scale = 0)
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ_DV_DEVOL_ANULA")
	public Long getNanulacion() {
		return this.nanulacion;
	}

	public void setNanulacion(Long nanulacion) {
		this.nanulacion = nanulacion;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "N_CORRELATIVO", nullable = false)
	public DvMedioDevol getDvMedioDevol() {
		return this.dvMedioDevol;
	}

	public void setDvMedioDevol(DvMedioDevol dvMedioDevol) {
		this.dvMedioDevol = dvMedioDevol;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(insertable = false, name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Column(name = "NIT", length = 14)
	public String getNit() {
		return this.nit;
	}

	public void setNit(String nit) {
		this.nit = nit;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Column(name = "S_MOTIVO", nullable = false, length = 50)
	public String getSmotivo() {
		return this.smotivo;
	}

	public void setSmotivo(String smotivo) {
		this.smotivo = smotivo;
	}

}
